xm-test restore: use ext3 (instead of ext2) and xvda (instead of hda)
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Aug 2009 12:40:21 +0000 (13:40 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 5 Aug 2009 12:40:21 +0000 (13:40 +0100)
This patch fixes the xm-test restore 04 testcase:
o uses ext3 instead of ext2 - which is not supported by the standard
kernel config
o uses xvdX instead of hdX for disks

Signed-off-by: Andreas Florath <xen@flonatel.org>
tools/xm-test/tests/restore/04_restore_withdevices_pos.py

index a7a67f7c93ff1e044e9c82bac4d42bbb3eb3e63f..e9eb29b3489c601d4e76fb7c321096e44827c7d5 100644 (file)
@@ -10,15 +10,15 @@ import re
 if ENABLE_HVM_SUPPORT:
     SKIP("Restore currently not supported for HVM domains")
 
-config = {"disk": ["phy:/dev/ram0,hda1,w", "phy:/dev/ram1,hdb2,w"],
+config = {"disk": ["phy:/dev/ram0,xvda1,w", "phy:/dev/ram1,xvdb2,w"],
           "vif":  ['', '']}
 domain = XmTestDomain(extraConfig=config)
 
-s, o = traceCommand("mke2fs -q /dev/ram0")
+s, o = traceCommand("mke2fs -j -q /dev/ram0")
 if s != 0:
     FAIL("Unable to mke2fs /dev/ram0 in dom0")
 
-s, o = traceCommand("mke2fs -q /dev/ram1")
+s, o = traceCommand("mke2fs -j -q /dev/ram1")
 if s != 0:
     FAIL("Unable to mke2fs /dev/ram1 in dom0")
 
@@ -32,21 +32,21 @@ try:
     if run["return"] != 0:
         FAIL("Unable to mkdir /mnt/a /mnt/b")
 
-    run = console.runCmd("mount /dev/hda1 /mnt/a")
+    run = console.runCmd("mount /dev/xvda1 /mnt/a")
     if run["return"] != 0:
-        FAIL("Unable to mount /dev/hda1")
+        FAIL("Unable to mount /dev/xvda1")
 
-    run = console.runCmd("mount /dev/hdb2 /mnt/b")
+    run = console.runCmd("mount /dev/xvdb2 /mnt/b")
     if run["return"] != 0:
-        FAIL("Unable to mount /dev/hdb2")
+        FAIL("Unable to mount /dev/xvdb2")
 
-    run = console.runCmd("echo hda1 > /mnt/a/foo")
+    run = console.runCmd("echo xvda1 > /mnt/a/foo")
     if run["return"] != 0:
-        FAIL("Unable to write to block device hda1!")
+        FAIL("Unable to write to block device xvda1!")
 
-    run = console.runCmd("echo hdb2 > /mnt/b/foo")
+    run = console.runCmd("echo xvdb2 > /mnt/b/foo")
     if run["return"] != 0:
-        FAIL("Unable to write to block device hdb2!")
+        FAIL("Unable to write to block device xvdb2!")
 
     run = console.runCmd("ifconfig eth0 172.30.206.1 netmask 255.255.255.240")
     if run["return"] != 0:
@@ -101,15 +101,15 @@ try:
     
     run = console.runCmd("cat /mnt/a/foo")
     if run["return"] != 0:
-        FAIL("Unable to read from block device hda1")
-    if not re.search("hda1", run["output"]):
-        FAIL("Failed to read correct data from hda1")
+        FAIL("Unable to read from block device xvda1")
+    if not re.search("xvda1", run["output"]):
+        FAIL("Failed to read correct data from xvda1")
 
     run = console.runCmd("cat /mnt/b/foo")
     if run["return"] != 0:
-        FAIL("Unable to read from block device hdb2")
-    if not re.search("hdb2", run["output"]):
-        FAIL("Failed to read correct data from hdb2")
+        FAIL("Unable to read from block device xvdb2")
+    if not re.search("xvdb2", run["output"]):
+        FAIL("Failed to read correct data from xvdb2")
 
     run = console.runCmd("ifconfig")
     if not re.search("eth0", run["output"]):